﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopHotelOrder")]
    public class TopHotelOrder : BaseObject
    {
        //begin
        public TopHotelOrder()
        {}
        public TopHotelOrder(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _OrderId;
        public string OrderId
        {
            get
            {
                return _OrderId;
            }
            set
            {
                SetPropertyValue("OrderId", ref _OrderId, value);
            }
        }
        private string _Tid;
        public string Tid
        {
            get
            {
                return _Tid;
            }
            set
            {
                SetPropertyValue("Tid", ref _Tid, value);
            }
        }
        private string _Hid;
        public string Hid
        {
            get
            {
                return _Hid;
            }
            set
            {
                SetPropertyValue("Hid", ref _Hid, value);
            }
        }
        private string _Rid;
        public string Rid
        {
            get
            {
                return _Rid;
            }
            set
            {
                SetPropertyValue("Rid", ref _Rid, value);
            }
        }
        private string _Gid;
        public string Gid
        {
            get
            {
                return _Gid;
            }
            set
            {
                SetPropertyValue("Gid", ref _Gid, value);
            }
        }
        private long _RoomNumber;
        public long RoomNumber
        {
            get
            {
                return _RoomNumber;
            }
            set
            {
                SetPropertyValue("RoomNumber", ref _RoomNumber, value);
            }
        }
        private long _Nights;
        public long Nights
        {
            get
            {
                return _Nights;
            }
            set
            {
                SetPropertyValue("Nights", ref _Nights, value);
            }
        }
        private string _Type;
        public string Type
        {
            get
            {
                return _Type;
            }
            set
            {
                SetPropertyValue("Type", ref _Type, value);
            }
        }
        private DateTime _CheckinDate;
        public DateTime CheckinDate
        {
            get
            {
                return _CheckinDate;
            }
            set
            {
                SetPropertyValue("CheckinDate", ref _CheckinDate, value);
            }
        }
        private DateTime _CheckoutDate;
        public DateTime CheckoutDate
        {
            get
            {
                return _CheckoutDate;
            }
            set
            {
                SetPropertyValue("CheckoutDate", ref _CheckoutDate, value);
            }
        }
        private long _TotalRoomPrice;
        public long TotalRoomPrice
        {
            get
            {
                return _TotalRoomPrice;
            }
            set
            {
                SetPropertyValue("TotalRoomPrice", ref _TotalRoomPrice, value);
            }
        }
        private long _Payment;
        public long Payment
        {
            get
            {
                return _Payment;
            }
            set
            {
                SetPropertyValue("Payment", ref _Payment, value);
            }
        }
        private string _SellerNick;
        public string SellerNick
        {
            get
            {
                return _SellerNick;
            }
            set
            {
                SetPropertyValue("SellerNick", ref _SellerNick, value);
            }
        }
        private string _BuyerNick;
        public string BuyerNick
        {
            get
            {
                return _BuyerNick;
            }
            set
            {
                SetPropertyValue("BuyerNick", ref _BuyerNick, value);
            }
        }
        private string _TradeStatus;
        public string TradeStatus
        {
            get
            {
                return _TradeStatus;
            }
            set
            {
                SetPropertyValue("TradeStatus", ref _TradeStatus, value);
            }
        }
        private string _RefundStatus;
        public string RefundStatus
        {
            get
            {
                return _RefundStatus;
            }
            set
            {
                SetPropertyValue("RefundStatus", ref _RefundStatus, value);
            }
        }
        private string _LogisticsStatus;
        public string LogisticsStatus
        {
            get
            {
                return _LogisticsStatus;
            }
            set
            {
                SetPropertyValue("LogisticsStatus", ref _LogisticsStatus, value);
            }
        }
        private string _ContactName;
        public string ContactName
        {
            get
            {
                return _ContactName;
            }
            set
            {
                SetPropertyValue("ContactName", ref _ContactName, value);
            }
        }
        private string _ContactPhone;
        public string ContactPhone
        {
            get
            {
                return _ContactPhone;
            }
            set
            {
                SetPropertyValue("ContactPhone", ref _ContactPhone, value);
            }
        }
        private string _ContactPhoneBak;
        public string ContactPhoneBak
        {
            get
            {
                return _ContactPhoneBak;
            }
            set
            {
                SetPropertyValue("ContactPhoneBak", ref _ContactPhoneBak, value);
            }
        }
        private DateTime _Created;
        public DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                SetPropertyValue("Created", ref _Created, value);
            }
        }
        private DateTime _Modified;
        public DateTime Modified
        {
            get
            {
                return _Modified;
            }
            set
            {
                SetPropertyValue("Modified", ref _Modified, value);
            }
        }
        private DateTime _PayTime;
        public DateTime PayTime
        {
            get
            {
                return _PayTime;
            }
            set
            {
                SetPropertyValue("PayTime", ref _PayTime, value);
            }
        }
        private DateTime _EndTime;
        public DateTime EndTime
        {
            get
            {
                return _EndTime;
            }
            set
            {
                SetPropertyValue("EndTime", ref _EndTime, value);
            }
        }
        private long _AlipayNo;
        public long AlipayNo
        {
            get
            {
                return _AlipayNo;
            }
            set
            {
                SetPropertyValue("AlipayNo", ref _AlipayNo, value);
            }
        }
        [Association("TopHotelOrderGuests", typeof(TopOrderGuest)), Aggregated]
        public XPCollection<TopOrderGuest> Guests
        {
            get
            {
                return GetCollection<TopOrderGuest>("Guests");
            }
        }
        //end
    }
}
